<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Site1.Master" AutoEventWireup="true" CodeBehind="Detalle.aspx.cs" Inherits="BoxScore.torneo.Detalle" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="_info.ascx" tagname="_info" tagprefix="uc1" %>
<%@ Register src="../juego/_resultados.ascx" tagname="_resultados" tagprefix="uc2" %>
<%@ Register src="../juego/_juegos.ascx" tagname="_juegos" tagprefix="uc3" %>
<%@ Register src="_lideres.ascx" tagname="_lideres" tagprefix="uc4" %>
<%@ Register src="../compartidas/_publicidadDisponible.ascx" tagname="_publicidadDisponible" tagprefix="uc5" %>
<%@ Register src="../compartidas/_noticias.ascx" tagname="_noticias" tagprefix="uc6" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="lateral1" runat="server">
    
    <uc5:_publicidadDisponible ID="_publicidadDisponible1" runat="server" />
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="lateral2" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="lateral3" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="contenido" runat="server">

    <h2 class="title" >Detalle del Torneo</h2>

<uc1:_info ID="_info1" runat="server" />

<h2 class="title">Tabla de Posiciones por Categoria</h2>

    <asp:GridView ID="GridView2" runat="server" GridLines="None" 
        AutoGenerateColumns="False" DataSourceID="ObjectDataSource4">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:HiddenField ID="HiddenField5" runat="server" 
                        Value='<%# Eval("id", "{0}") %>' />
                    <br />
                    <h2>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("descripcion", "{0}") %>'></asp:Label>
                    </h2>
                    
                    <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" ShowHeader="false" GridLines="None" 
                        DataSourceID="ObjectDataSource10" >
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:HiddenField ID="HiddenField6" runat="server" 
                                        Value='<%# Eval("id", "{0}") %>' />
                                        <br />
                                    <i>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("descripcion", "{0}") %>'></asp:Label>
                                    </i>
                                    <br />
                                    <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
                                        DataSourceID="ObjectDataSource11" >
                                        <Columns>
                                <asp:TemplateField HeaderText="Equipo">
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" 
                                NavigateUrl='<%# "~/Equipo/Detalle.aspx?equipo=" +  Eval("idequipo", "{0}") + "&categoria=" + Eval("idcategoria", "{0}") + "&torneo=" + Eval("idtorneo", "{0}")   %>' 
                                Text='<%# Eval("nombre", "{0}") %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                                        
                    <asp:BoundField DataField="juegos" HeaderText="G" SortExpression="juegos" />
                    <asp:BoundField DataField="victorias" HeaderText="W" 
                        SortExpression="victorias" />
                    <asp:BoundField DataField="empates" HeaderText="T" SortExpression="empates" />
                    <asp:BoundField DataField="derrotas" HeaderText="L" SortExpression="derrotas" />
                    <asp:BoundField DataField="run" HeaderText="R" SortExpression="run" />
                    <asp:BoundField DataField="h" HeaderText="H" SortExpression="h" />
                    <asp:BoundField DataField="h2" HeaderText="H2" SortExpression="h2" />
                    <asp:BoundField DataField="h3" HeaderText="H3" SortExpression="h3" />
                    <asp:BoundField DataField="hr" HeaderText="HR" SortExpression="hr" />
                    <asp:BoundField DataField="rbi" HeaderText="RBI" SortExpression="rbi" />
                    <asp:BoundField DataField="bb" HeaderText="BB" SortExpression="bb" />
                    <asp:BoundField DataField="so" HeaderText="SO" SortExpression="so" />
                    <asp:BoundField DataField="robadas" HeaderText="SB" SortExpression="robadas" />
                    <asp:BoundField DataField="average" HeaderText="AVG." 
                        SortExpression="average" DataFormatString=".{0:F0}" />
                    <asp:BoundField DataField="slugging" HeaderText="SLG" DataFormatString="{0:F3}" 
                        SortExpression="slugging" />
                    <asp:TemplateField Visible="false">
                        <ItemTemplate>
                            <asp:HiddenField ID="HiddenField1" runat="server" 
                                Value='<%# Eval("idtorneo", "{0}") %>' />
                            <asp:HiddenField ID="HiddenField2" runat="server" 
                                Value='<%# Eval("idequipo", "{0}") %>' />
                            <asp:HiddenField ID="HiddenField3" runat="server" 
                                Value='<%# Eval("idcategoria", "{0}") %>' />
                                
                            
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="puntos" HeaderText="Ptos." />
                                        </Columns>
                                        
                                    </asp:GridView>
                                    <asp:ObjectDataSource ID="ObjectDataSource11" runat="server" 
                                        SelectMethod="getEquiposPorTorneoCategoria" 
                                        TypeName="BoxScore.Model.BoxScoreBD">
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="HiddenField5" DefaultValue="0" 
                                                Name="idcategoria" PropertyName="Value" Type="Int32" />
                                            <asp:ControlParameter ControlID="HiddenField6" DefaultValue="0" Name="idGrupo" 
                                                PropertyName="Value" Type="Int32" />
                                            <asp:QueryStringParameter DefaultValue="0" Name="idtorneo" 
                                                QueryStringField="torneo" Type="Int32" />
                                        </SelectParameters>
                                    </asp:ObjectDataSource>
                                    <asp:HyperLink ID="HyperLink2" runat="server" 
                                        NavigateUrl='<%# "~/Estadisticas/LideresXTorneo.aspx?torneo=" + Request["torneo"] + "&grupo=" + Eval("id", "{0}") + "&categoria=" + ViewState["HiddenField5"] %>' 
                                        Text="Ver Lideres"></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ObjectDataSource10" runat="server" 
                        SelectMethod="getGrupoXCategoria" TypeName="BoxScore.Model.BoxScoreBD">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="HiddenField5" DefaultValue="0" 
                                Name="idcategoria" PropertyName="Value" Type="Int32" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
        
    <asp:ObjectDataSource ID="ObjectDataSource4" runat="server" 
        SelectMethod="getCategoriasPorTorneo" TypeName="BoxScore.Model.BoxScoreBD"><SelectParameters><asp:QueryStringParameter DefaultValue="0" Name="id" QueryStringField="torneo" 
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

<br />



<uc4:_lideres ID="_lideres1" runat="server" />


</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="resultados" runat="server">
    
    <uc2:_resultados ID="_resultados1" runat="server" />
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="proximos" runat="server">

    <uc3:_juegos ID="_juegos1" runat="server" />
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="publicidadAjena" runat="server">
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="publicidad" runat="server">
</asp:Content>
